# README #
## Replication files for **Sub-group Differences in Implicit Associations and Explicit Attitudes during Wartime**  ##

### What is this repository for? ###

Replicating statistical analysis Figures and Tables from Erlich & Garner (2021).

### How do I get set up? ###

* required data sets are in `data_clean/`
* required packages are loaded at the start of `master.R`, including the package `simcf`, which is installed if not already installed
* required directory structure is created if not present in `master.R`. 
* all analysis code is run from `code/master.R`: `data_exp2.R` contains summary statistics and visuals, as well as regression models; `sim_cf_preds.R` simulates quantities of interest and plots these values; `weighted_analysis.R` generates the main regression table and the predicted values plots after weighting the data as described in the text.
* tables and plots are saved to `tables/` and `plots/`, respectively.

### Who do I talk to? ###

* We welcome comments. Please contact [aaron.erlich@mcgill.ca] or [calvin.h.garner@gmail.com.]

### Difficulty running? 

* Try the website [https://osf.io/e5h48/] for packrat version, which has the complete set of package dependencies required to run all the analysis.
* If `simcf`-download fails, try the website [https://faculty.washington.edu/cadolph/?page=60] (download via "Mac" or "PC" button) 